/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sge.Entidades;

import java.util.Collection;

/**
 *
 * @author victor
 */
public class Material implements Entidad {

    private Integer idMaterial;
    private String nombre;
    private Double costo;
    private String descripcion;
    private int cantidad;
    private int precio;
    private Collection<EventoMaterial> eventoMaterialCollection;

    public Material() {
    }

    public Material(Integer idMaterial) {
        this.idMaterial = idMaterial;
    }

    public Material(Integer idMaterial, String nombre) {
        this.idMaterial = idMaterial;
        this.nombre = nombre;
    }

    public Integer getIdMaterial() {
        return idMaterial;
    }

    public void setIdMaterial(Integer idMaterial) {
        this.idMaterial = idMaterial;
    }

    public int getCantidad() {
        return cantidad;
    }

    public void setCantidad(int cantidad) {
        this.cantidad = cantidad;
    }

    public int getPrecio() {
        return precio;
    }

    public void setPrecio(int precio) {
        this.precio = precio;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public Double getCosto() {
        return costo;
    }

    public void setCosto(Double costo) {
        this.costo = costo;
    }

    public Collection<EventoMaterial> getEventoMaterialCollection() {
        return eventoMaterialCollection;
    }

    public void setEventoMaterialCollection(Collection<EventoMaterial> eventoMaterialCollection) {
        this.eventoMaterialCollection = eventoMaterialCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMaterial != null ? idMaterial.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Material)) {
            return false;
        }
        Material other = (Material) object;
        if ((this.idMaterial == null && other.idMaterial != null) || (this.idMaterial != null && !this.idMaterial.equals(other.idMaterial))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sge.Entidades.Material[ idMaterial=" + idMaterial + " ]";
    }
}
